package com.example.exceptions.enumetation;

import lombok.Getter;

import java.util.Locale;

/**
 * @author: sjz
 * @since: 2024/6/30 19:50
 */
@Getter
public enum ResponseEnum {

    SUCCESS(1, "成功"),
    ERROR(-1, "失败"),
    SERVER_BUSY(300, "服务器繁忙"),
    USERNAME_OR_PASSWORD_ERROR(401, "用户名或密码错误"),
    USERNAME_EXIST(402, "用户名已存在"),
    CATEGORY_DELETE_FAIL(501, "当前分类下关联了菜品,不能删除"),
    DISH_DELETE_FAIL(502, "该菜品正在售卖,请先停售"),
    SETMEAL_DELETE_FAIL(503, "该套餐正在售卖中,不能删除"),
    SHOPPINGCART_IS_EMPTY(601, "购物车为空,不能下单"),
    ADDRESS_ERROR(602, "用户地址信息有误,不能下单");


    private Integer code;
    private String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
